package com.xiaomi.baidumap.splash;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;

import com.xiaomi.baidumap.R;
import com.xiaomi.baidumap.common.ActivityUtils;
import com.xiaomi.baidumap.login.LoginActivity;
import com.xiaomi.baidumap.MainActivity;


import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;


/**
 * Created by Administrator on 16-8-25.
 */
public class SplashActivity extends AppCompatActivity {
    //使用butterknife
    @BindView(R.id.btnEnter) Button mBtnEnter;
    @BindView(R.id.login) Button mLogin;
    private ActivityUtils activityUtils;

    //点击登录
    @OnClick(R.id.login) void login(){
        //跳转到登录界面
        activityUtils.startActivity(LoginActivity.class);
        finish();
    }
    //点击进入github
    @OnClick(R.id.btnEnter) void enter(){
        //直接进入
        activityUtils.startActivity(MainActivity.class);
        finish();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        activityUtils = new ActivityUtils(this);
        //绑定butterknife的第三方框架并且要绑定
        ButterKnife.bind(this);

    }
}
